package core.controls;

import com.rational.test.ft.object.interfaces.TestObject;

import core.testcases.TestObj;

public abstract class Control<T extends TestObject> extends TestObj
{
	public Control(String propertyValue, String propertyName, String objClass,
			TestObject parent, String descriptiveName) {
		super(propertyValue, propertyName, objClass, parent, descriptiveName);
		obj = null;
		testObject = null;
		isCreatedFromTestObject = false;
		
		if(propertyValue == null && propertyName == null && objClass == null)
		{
			isCognosControl = true;
		}
		else
		{
			isCognosControl = false;
		}
	}
	
	public Control(TestObject object, String descriptiveName) {
		super(descriptiveName);
		obj = null;
		testObject = object;
		isCreatedFromTestObject = true;
		isCognosControl = false;
	}
	
	private boolean isCreatedFromTestObject;
	private boolean isCognosControl;
	
	public boolean isCreatedFromTestObject() {
		return isCreatedFromTestObject;
	}
	
	public boolean isCognosControl()
	{
		return isCognosControl;
	}

	public abstract boolean isEnabled();
	public abstract boolean isExist();
	
	public abstract T get();
	protected T obj;
	protected TestObject testObject;

}

